#include <esp_flash.h>
#include <esp_log.h>

void log_flash_info(){
    uint32_t chip_size;
    esp_err_t ret = esp_flash_get_size(esp_flash_default_chip, &chip_size);
    if (ret == ESP_OK)
    {
        ESP_LOGI("ESP", "Flash chip size: %lu bytes (%.2f MB)", chip_size, chip_size / (1024.0 * 1024.0));
    }
    else
    {
        ESP_LOGE("ESP", "Failed to get Flash chip size: %s", esp_err_to_name(ret));
    }
}